# -*- coding: utf-8 -*-

DATETIME_FORMAT = '%Y-%m-%d %H:%M:%S:%f'
DATE_FORMAT = '%Y-%m-%d'


class CodeException(Exception):
    def __init__(self, code, msg):
        super().__init__()
        self.code = code
        self.msg = msg

    def __str__(self):
        return "%d - %s" % (self.code, self.msg)

    def __unicode__(self):
        return u"%d - %s" % (self.code, self.msg)